package com.syan.learn.optimization.ch02.singleton;


public class StaticSingleton {

	public static StaticSingleton instanse = null;;

	private StaticSingleton() {
		System.out.println("constructor...");
	}

	private static class SingletonHolder{
		private static StaticSingleton instanse = new StaticSingleton();
	}
	
	public static StaticSingleton getInstanse() {
		return SingletonHolder.instanse;
	}

	public void doSomething() {
		System.out.println("do someting...");
	}

	public static void main(String[] args) {
		StaticSingleton.getInstanse().doSomething();
	}

}
